<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='菜谱管理-添加',jsPaths='/static/js/food/menu/add.js')">
<div class="right" th:fragment="right">
            <!--面包屑-->
            <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="/foodManage">菜谱管理</a>
                    <a href="/foodManage">菜谱管理</a>
                    <a><cite>新增</cite></a>
                </span>
            </div>

            <!--主体内容区-->
            <div class="form-content">
                    <form class="layui-form" th:action="@{/foodManage/save}" method="post">
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend>菜谱管理</legend>
                        </fieldset>
                        <div class="layui-row">
                            <div class="layui-col-md6 layui-col-md-offset1"  style="width: 80%;">
                                <div><button type="button" class="layui-btn layui-btn-sm" id="addRow" >添加一行</button></div>
                                <table class="layui-table">
                                    <thead>
                                        <tr>
                                            <th style=" width: 15%;">餐谱日期</th>
                                            <th style=" width: 15%;">菜名</th>
                                            <th style=" width: 40%;">配料</th>
                                            <th style=" width: 15%;">用餐时间</th>
                                            <th style=" width: 15%;">厨师</th>
                                            <th style=" width: 15%;">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody id="items_tbody">
                                        <tr>
                                            <td>
                                                <input type="text" name="foodDate"  id="rowOne" readonly lay-verify="required" placeholder="餐谱日期" autocomplete="off" class="layui-input ">
                                            </td>
                                            <td>
                                                <input type="text" name="foodName"  maxlength="20" lay-verify="required"    placeholder="菜名" autocomplete="off" class="layui-input ">
                                            </td>
                                            <td>
                                                <input type="text" name="foodBurden" maxlength="255" lay-verify="required|burdenFood"     placeholder="配料" autocomplete="off" class="layui-input">
                                            </td>
                                            <td>
                                                <input type="text" name="foodTime" id="rowOneTime" readonly lay-verify="required"  placeholder="用餐时间" autocomplete="off" class="layui-input">
                                            </td>
                                            <td>
                                                <input type="text" name="createUserName" maxlength="10" lay-verify="required"   placeholder="厨师" autocomplete="off" class="layui-input">
                                            </td>
                                            <td style="width: 20%">
                                                <button type="button" class="layui-btn layui-btn-disabled layui-btn layui-btn-sm">删除</button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn  layui-btn-normal"  lay-submit lay-filter="submitBtn">保存</button>
                                <a href="/foodManage" class="layui-btn layui-btn-primary">返回</a>
                            </div>
                        </div>
                    </form>
            </div>
            <script id="qtsf" type="text/html">
                <tr>
                    <td>
                        <input type="text" name="foodDate"   readonly lay-verify="required" placeholder="餐谱日期" value="{{ d.foodDate }}" autocomplete="off" class="layui-input ">
                    </td>
                    <td>
                        <input type="text" name="foodName"  maxlength="20" lay-verify="required"    placeholder="菜名" autocomplete="off" class="layui-input ">
                    </td>
                    <td>
                        <input type="text" name="foodBurden" maxlength="255" lay-verify="required|burdenFood"     placeholder="配料" autocomplete="off" class="layui-input">
                    </td>
                    <td>
                        <input type="text" name="foodTime"  readonly lay-verify="required"  placeholder="用餐时间" autocomplete="off" class="layui-input">
                    </td>
                    <td>
                        <input type="text" name="createUserName" maxlength="10" lay-verify="required"   placeholder="厨师" autocomplete="off" class="layui-input">
                    </td>
                    <td style="width: 20%">
                        <button type="button" class="layui-btn layui-btn-normal layui-btn layui-btn-sm" onclick="delFoodRow(this)">删除</button>
                    </td>
                </tr>
            </script>
        </div>
</html>